package version.test.dto;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.metadata.OrderItem;
import lombok.Data;

import java.util.List;

/**
 * @description:
 * @author: hzw
 * @time: 2023/11/20 16:15
 */
@Data
public class PageInfo<T> implements IPage {

    private Integer pageNo;
    private Integer pageSize;
    private List<T> records;
    private Long total;
    private Long size;
    private Long current;
    private List<OrderItem> orders;

    @Override
    public List<OrderItem> orders() {
        return this.orders;
    }

    @Override
    public List getRecords() {
        return this.records;
    }

    @Override
    public PageInfo setRecords(List records) {
        this.records = records;
        return this;
    }

    @Override
    public long getTotal() {
        return this.total;
    }

    @Override
    public IPage setTotal(long total) {
        this.total = total;
        return this;
    }

    @Override
    public long getSize() {
        return this.size;
    }

    @Override
    public IPage setSize(long size) {
        this.size = size;
        return this;
    }

    @Override
    public long getCurrent() {
        return this.current;
    }

    @Override
    public IPage setCurrent(long current) {
        this.current = current;
        return this;
    }
}
